<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Layui</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<script type="text/javascript" src="../js/jquery-3.0.0.js"></script>
		<!--<script src="../js/management.js" type="text/javascript" charset="utf-8"></script>-->
		<link rel="stylesheet" type="text/css" href="../layui/css/layui.css" media="all" />
		<script src="../layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../css/customer.css" />
        <!--<link rel="stylesheet" type="text/css" href="../css/add_manage.css" />-->
        <link rel="stylesheet" type="text/css" href="../css/city-picker.css">
		<script type="text/javascript" src="../js/jquery.min.js"></script>
		<script type="text/javascript" src="../js/citydata.js"></script>
		<script type="text/javascript" src="../js/cityPicker-1.0.0.js?v=1"></script>
		<!--<script type="text/javascript" src="../layui/layui.all.js" charset="utf-8"></script>-->
		<script src="../layui/layui.all.js" type="text/javascript" charset="utf-8"></script>


        <style type="text/css">
            /* html, */
            body {
                width: 100%;
                height: 100%;

                overflow: overlay;
            }

            .layui-container {
                width: 100%;
                height: 100%;

            }


            .logo-title {
                text-align: left;
                letter-spacing: 2px;
                padding: 10px 0;
            }

            .logo-title h1 {
                font-size: 25px;
                font-weight: bold;
            }

            .layui-form {
                background-color: #fff;
                border: 1px solid #fff;
                border-radius: 3px;
                padding: 0px 20px;
                box-sizing: border-box;
            }

            .layui-form .layui-form-item label {
                width: 100px;
            }

            .layui-form .layui-form-item input {
                line-height: 36px;
            }
            .add_btn{
                float: right;
                right: 20px;
            }
        </style>
	</head>
	<body>
		
		<form class="layui-form" action="" layui-filter="cu_form">
			<div class="layui-form-item">
				<div style=" float: left;  width: 300px; height: 40px;"><img style="width: 35px;height: 35px; margin-left: 30px; "
				 src=""
					> <span  class="text" style="margin: 10px; line-height: 40px; font-size: 18px;  color: #000000;  font-weight: 700; "   >员工管理</span></div>
			
				<div class="layui-inline">
					<div class="cu_search">
						<div class="layui-input-inline">
							<i class="layui-btn layui-btn-xs layui-btn-primary layui-btn-radius layui-icon layui-icon-close layui-hide" id="inputClear" style="position: absolute;float: right;right: 10px;top: 8px;"></i>
							<input placeholder="请输入员工姓名/手机号" class="layui-input" type="text" name="id" id="cu_input" autocomplete="off">
						</div>
						<div class="layui-btn search_btn" data-type="reload" id="search_btn">搜索</div>
					</div>
				</div>

				<div class="layui-btn-group cu_button" id="cu_button">
					<button type="button" class="layui-btn" data-method="offset" data-type="auto" id="cu_create">添加员工</button>
					<!-- <button type="button" class="layui-btn " lay-event="edit" id="cu_edit">编辑客户</button> -->
					<button type="button" class="layui-btn layui-btn-danger" id="cu_del">批量删除</button>
				</div>
			</div>
		</form>

		<!-- 这里是弹出层的表单信息 -->
		<!--<div class="layui-container">-->
			<div class="layui-login-background" id="add_management" style="display:none;">
				<div class="layui-form layui-form" >
					<form class="layui-form" action="" id="popupForm" lay-filter="popupFormFilter">
						<div class="layui-form-item logo-title">
							<h1>添加员工</h1>
						</div>
						<fieldset class="layui-elem-field layui-field-title" >
							<legend>个人信息</legend>
						</fieldset>
						<div class="layui-form-item">
                            <div class="layui-inline" style="display: none;">
                                <label class="layui-form-label" >ID</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="id" lay-verify="required|username" autocomplete="off" class="layui-input" />
                                </div>
                            </div>
							<div class="layui-inline">
								<label class="layui-form-label" ><font style="color: red;">*</font>姓名</label>
								<div class="layui-input-inline">
									<input type="text" name="u_name" lay-verify="required|username" autocomplete="off" class="layui-input" />
								</div>
							</div>

							<div class="layui-inline">
								<label class="layui-form-label">性别</label>   <!--for="u_sex"-->
								<div class="layui-input-inline">
									<input type="radio" name="u_sex" value="男" title="男"  checked> <input type="radio" name="u_sex" value="女" title="女" >
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label">出生日期</label>
								<div class="layui-input-inline">
									<input type="date" name="u_birthday" lay-verify="date" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label">年龄</label>
								<div class="layui-input-inline">
									<input type="number" name="u_age" lay-verify="int" autocomplete="off" class="layui-input">
								</div>
							</div>
						</div>

						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label"><font style="color: red;">*</font>手机号</label>
								<div class="layui-input-inline">
									<input type="tel" name="u_phone" lay-verify="required|phone" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label"><font style="color: red;">*</font>个人邮箱</label>
								<div class="layui-input-inline">
									<input type="text"  name="u_email" lay-verify="email" autocomplete="off" class="layui-input">   <!--name="u_email"-->
								</div>
							</div>
						</div>

						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label" >证件类型</label>   <!--for="u_doc_type"-->
								<div class="layui-input-inline">
									<select name="u_doc_type" lay-verify="required">
										<option value=""></option>
										<option value="身份证">身份证</option>
										<option value="台湾通行证">台湾通行证</option>
										<option value="港澳通行证">港澳通行证</option>
										<option value="护照">护照</option>
										<option value="其他">其他</option>
									</select>
								</div>
							</div>
							<div class="layui-inline">

								<label class="layui-form-label" ><font style="color: red;">*</font>证件号码</label>  <!--for="u_doc_number"-->
								<div class="layui-input-inline">
									<input type="text" name="u_doc_number" lay-verify="lay-verify=”identity”" autocomplete="off" class="layui-input" />
								</div>

							</div>
						</div>
						<div class="layui-form-item">

							<label class="layui-form-label" >籍贯</label>   <!--for="u_native"-->
							<div class="city-picker-selector"  id="city-picker-search">
								<div class="selector-item storey province">
									<a href="javascript:;"  class="selector-name reveal df-color ">请选择省份</a>
									<input type="hidden" name="userProvinceId"  class="input-price val-error" value="" >  <!--name="userProvinceId"-->
									<div class="selector-list listing hide">
										<div class="selector-search">
											<input type="text" class="input-search" value="" placeholder="拼音、中文搜索">
										</div>
										<ul>
											<li>北京市</li>
											<li>天津市</li>
										</ul>
									</div>
								</div>
								<div class="selector-item storey city">
									<a href="javascript:;" class="selector-name reveal df-color forbid">请选择城市</a>
									<input type="hidden" name="userCityId"  class="input-price val-error" value="" >
									<div class="selector-list listing hide">
										<div class="selector-search">
											<input type="text" class="input-search" value="" placeholder="拼音、中文搜索">
										</div>
										<ul></ul>
									</div>
								</div>
								<div class="selector-item storey district">
									<a href="javascript:;" class="selector-name reveal df-color forbid">请选择区县</a>
									<input type="hidden" name="userDistrictId"  class="input-price val-error" value="" >  <!--name="userDistrictId"-->
									<div class="selector-list listing hide">
										<div class="selector-search">
											<input type="text" class="input-search" value="" placeholder="拼音、中文搜索">
										</div>
										<ul></ul>
									</div>
								</div>
							</div>

						</div>

						<fieldset class="layui-elem-field layui-field-title" >
							<legend>入职信息</legend>
						</fieldset>
						<div class="layui-form-item">
							<div class="layui-inline" >
								<label class="layui-form-label"><font style="color: red;">*</font>入职日期</label>
								<div class="layui-input-inline">
									<input type="date" name="u_entry_time" class="layui-input" id="u_entry_time" placeholder="选择日期">
								</div>
							</div>

							<div class="layui-inline">
								<label class="layui-form-label" >部门</label>   <!--for="u_department"-->
								<div class="layui-input-inline">
									<select name="u_department" lay-verify="required">
										<option value=""></option>
										<option value="人事部">人事部</option>
										<option value="市场部">市场部</option>
										<option value="企划部">企划部</option>
										<option value="财务部">财务部</option>
										<option value="管理中心">管理中心</option>
									</select>
								</div>
							</div>
						</div>



						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label" >岗位</label>   <!-- for="u_job"-->
								<div class="layui-input-inline">
									<select name="u_job" lay-verify="required">
										<option value=""></option>
										<option value="销售">销售</option>
										<option value="客服">客服</option>
										<option value="经理">经理</option>
										<option value="主任">主任</option>
										<option value="总裁">总裁</option>
									</select>
								</div>
							</div>

							<div class="layui-inline">
								<label class="layui-form-label" for="cu_principal">直属上级</label>
								<div class="layui-input-inline">
									<select name="u_superior" lay-verify="required" id="cu_principal" lay-search="" lay-filter="cu_principal"></select>
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label" ><font style="color: red;">*</font>工号</label>    <!--for="u_job_number"-->
								<div class="layui-input-inline">
									<input type="text" name="u_job_number" lay-verify="required" autocomplete="off" class="layui-input" />
								</div>
							</div>

							<div class="layui-inline">
								<label class="layui-form-label" >是否已婚</label>    <!--for="u_ismarry"-->
								<div class="layui-input-inline">
									<input type="radio" name="u_ismarry" value="是" title="是"  checked> <input type="radio" name="u_ismarry" value="否" title="否">
								</div>
							</div>
						</div>

						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label" >是否健康</label>    <!-- for="u_health"-->
								<div class="layui-input-inline">
									<input type="radio" name="u_health" value="健康" title="健康"  checked> <input type="radio" name="em_health" value="不健康" title="不健康">
								</div>
							</div>
							<div class="layui-inline">
								<label class="layui-form-label" >最高学历</label>   <!--for="u_education"-->
								<div class="layui-input-inline">
									<select name="u_education" lay-verify="required">
										<option value=""></option>
										<option value="博士">博士</option>
										<option value="硕士">硕士</option>
										<option value="大学本科">大学本科</option>
										<option value="高中">高中</option>
										<option value="其他">其他</option>
									</select>
								</div>
							</div>
						</div>
						<div class="layui-form-item add_btn">
                            <button class="layui-btn" lay-submit="save" type="submit" lay-filter="save" >保存</button>
							<button type="reset" class="layui-btn layui-btn-primary" type="submit" lay-filter="cancel" id="colseBtn">取消</button>

						</div>
					</form>
				</div>
			</div>
		<!--</div>-->

		<table class="layui-hide" id="tb" lay-filter="cu_demo" style="margin-top: 50px;"></table>
		<script type="text/html" id="barDemo">
			<a class="layui-btn layui-btn-xs" lay-event="edit"  id="cu_edit">编辑</a>
			    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
			</script>

        <script type="text/javascript">
            $(function() {
                layui.use(["laypage", "table", "form","layer","laydate"], function() {
                    var laypage = layui.laypage;
                    var page, limit;
                    var $ = layui.jquery;
                    var form = layui.form;
                    var table = layui.table;
                    var element = layui.element;
					var layer=layui.layer;
					var laydate=layui.laydate;
					var popForm=layui.form;
					//1.表格渲染
                    table.render({
                        elem: '#tb',
						url: '../user/findAll',
                        toolbar: '#toolbarDemo', //开启头部工具栏，并为其绑定左侧模板
                        defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
                            title: '提示',
                            layEvent: 'LAYTABLE_TIPS',
                            icon: 'layui-icon-tips'
                        }],
                        height: 480,
                        title: '员工数据表',
                        cols: [
                            [ //表头
                                {
                                    type: 'checkbox',
                                    fixed: 'left'
                                    // style: 'text-align:center'
                                },{
                                field: 'u_name',
                                title: '名字',
                                width: 150,
                                sort: true,
                                fixed: true
                            },
                                {
                                    field: 'id',
                                    title: 'ID',
                                    width: 150,
                                    sort: true

                                }, {
                                field: 'u_phone',
                                title: '手机',
                                width: 200
                            }, {
                                field: 'u_doc_type',
                                title: '证件类型',
                                width: 200
                            }, {
                                field: 'u_doc_number',
                                title: '证件号码',
                                width: 200
                            }, {
                                field: 'u_sex',
                                title: '性别',
                                width: 100,
                                sort: true
                            }, {
                                field: 'u_age',
                                title: '年龄',
                                width: 100
                            }, {
                                field: 'u_email',
                                title: '个人邮箱',
                                width: 150,
                                sort: true
                            }, {
                                field: 'u_birthday',
                                title: '出生日期',
                                width: 150,
                                sort: true
                            }, {
                                field: 'u_ismarry',
                                title: '是否已婚',
                                width: 150,
                                sort: true
                            }, {
                                field: 'u_country',
                                title: '国家地区',
                                width: 200
                            }, {
                                field: 'u_nation',
                                title: '民族',
                                width: 150
                            },  {
                                field: 'u_politics',
                                title: '政治面貌',
                                width: 150
                            }, {
                                field: 'u_native',
                                title: '籍贯',
                                width: 150
                            },{
                                field: 'u_health',
                                title: '健康状况',
                                width: 100
                            },{
                                field: 'u_education',
                                title: '最高学历',
                                width: 100
                            }, {
                                field: 'u_job_number',
                                title: '工号',
                                width: 100
                            }, {
                                field: 'u_department',
                                title: '部门',
                                width: 150
                            }, {
                                field: 'u_entry_time',
                                title: '入职时间',
                                width: 150
                            }, {
                                field: 'u_job',
                                title: '岗位',
                                width: 100
                            }, {
                                field: 'u_superior',
                                title: '直属上级',
                                width: 100
                            },{
                                fixed: 'right',
                                title: '操作',
                                width: 200,
                                align: 'center',
                                toolbar: '#barDemo'
                            }]],
                     /*   data: [{
                            "id":1,
                            "u_name": "张三",
                            "u_phone": "18778762534",
                            "u_doc_type": "身份证",
                            "u_doc_number": "4408232663538",
                            "u_sex": "女",
                            "u_age": "28",
                            "u_email":"22@@qq.com",
                            "u_birthday": "2000-10-10",
                            "u_ismarry": "否",
                            "u_country": "广东广州",
                            "u_nation": "汉族",
                            "u_health": "健康",
                            "u_education": "硕士",
                            "u_job_number": "11028",
                            "u_department": "人事部",
                            "u_entry_time": "2020-11-11",
                            "u_job": "客服",
                            "u_superior": "经理",
                            "u_politics": "党员",
                            "u_native": "广东广州"
                        }],*/
                        page: true,
                        id: 'testReload',
                        parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
                            return {
                                "code": res.code, //解析接口状态
                                "msg": res.msg, //解析提示文本
                                "count": res.count, //解析数据长度
                                "data": res.data //解析数据列表
                            }}
                    });



                    //监听表格复选框选择
                    table.on('checkbox(cu_demo)', function(obj) {
                        console.log(obj)
                    });

                    //监听表格操作
                    table.on('tool(cu_demo)', function(obj) { //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
                        var data = obj.data; //获得当前行数据
                        var layEvent = obj.event; //获得 lay-event 对应的值（也可以是表头的 event 参数对应的值）
                        var tr = obj.tr; //获得当前行 tr 的DOM对象

                        if (layEvent === 'del') { //删除
                                var checkStatus = table.checkStatus('testReload');
                                var data1 = checkStatus.data;

                                console.log("data1=" + data1)
                                var ids = [];
                                data1.forEach(function(n, i) {
                                    ids.push(n.id);
                                });

                                if (ids != '') {
                                    layer.confirm('真的删除ID为：' + data.id + '的用户吗?', function(index) {
                                        console.log("ids===="+JSON.stringify(ids)+"=====")
                                        $.ajax({
                                            url: '../user/deleteUser',
                                            type: 'POST',
                                            contentType : "application/json" ,
                                            dataType: 'JSON',
                                            data:JSON.stringify(ids),
                                            success: function(data) {
                                                if (data.code === 0) {
                                                    layer.msg('删除成功');
                                                    table.reload('testReload', {});
                                                } else {
                                                    layer.msg('删除失败');
                                                }
                                            },
                                            'error': function() {
                                                layer.msg('系统错误');
                                            }
                                        })
                                    })
                                } else {
                                    /*layer.tips('请选择需要删除的行', $('.batchDel'), {
                                        tips: [3, '#5fb878']
                                    })*/
                                    layer.msg('请选择需要删除的行',{skin:'msgSkin'});

                                }


                        } else if (layEvent === 'edit') { //编辑
							console.log(data);
							layer.open({
								//layer提供了5种层类型。可传入的值有：0（信息框，默认）1（页面层）2（iframe层）3（加载层）4（tips层）
								type: 1,
								title: "修改员工信息",
								shade: 0.8,
								anim: 1,
								skin: 'layui-layer-molv',
								area: ['800px', '80%'],
								shadeClose: false,
								content: $("#add_management"),
								success: function (index) {
									console.log(data);
									form.val("popupFormFilter", data);
									//给地址栏赋值
									var arr = new Array();
									arr = data.u_native.split("-");
									var province = arr[0];
									var city = arr[1];
									var district = arr[2];
									console.log(province + " " + city + " " + district)
									$(".province").find("a").text(province);
									$(".city").find("a").text(city);
									$(".district").find("a").html(district);
								}
							});


							//监听submit提交按钮 button ，lay-filter 为 save 的
							form.on('submit(save)', function(data) {
								//此段代码可以获取提交的数据
								/* layer.alert(JSON.stringify(data.field), {
                                     title: '最终的提交信息'
                                 })*/
								//ajax 提交
								console.log(JSON.stringify(data.field));
								console.log($('#popupForm').serialize());
								$.ajax({
									type: "POST",
									dataType: "JSON",
									url: "../user/updateUser",
									data:$('#popupForm').serialize(), //表单数据
									// contentType: "application/json; charset=utf-8",
									success: function(result) {
										if (result.code == 0) {

											layer.msg('修改成功，1秒后自动关闭该窗口');
											//延迟1秒执行，目的是让用户看到提示
                                          /*  parent.layui.table.reload('testReload', {
                                                url: '../user/findAll',
                                                //methods:"post"
                                                page: {
                                                    curr: 1 //条件查询从第一页开始，否则从当前页面开始
                                                }
                                            });*/
                                            table.reload('testReload', {});
											setTimeout(function(){

												layer.closeAll();

											}, 1 * 1000);
										};
									},
									error: function() {
										layer.msg('后台异常！未修改成功');
									}
								});
								//阻止页面跳转
								return false;
							});
						}
                    });

					//取消并关闭页面
					$("#colseBtn").click(function(data) {
						//parent.location.reload(); // 父页面刷新
						/*var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
						parent.layer.close(index); //再执行关闭*/
                        layer.closeAll();
						return false;
					});


					laydate.render({
						elem: '#cu_time',
						type: 'datetime'
					});


					//创建员工弹出层
                    //alert
                    $("#cu_create").on("click",function() {
                        //input here
                        layer.open({
                            type: 2,
                            title: 'CRM欢迎您',
                            // shadeClose: true,
                            shade:  [0.7, '#393D49'],

                            area: ['800px', '80%'],
                            // shadeClose: false,

                            content: 'add_management.html', //iframe的url
                            /* end: function() { //刷新页面
                                location.reload();
                            } */
                           /*  success:function(index){
                                $("#popupForm")[0].reset();
                            } */
                        });
                        //input above
                    });

					//5.页面打开时异步加载数据,查询负责人
					$.ajax({
						url: "../user/findAll?page=1&limit=10",
						async: false,
						type: "POST",
						datatype: "JSON",
						data: {},
						success: function(data) {
							if (data.data != "" && data.data != null) {
								var length = data.data.length;
								var html1 = '<dd lay-value="" class="layui-select-tips layui-this">直接选择</dd>';
								var html2 = '<option value="" >直接选择</option>';
								for (var i = 0; i < length; i++) {
									html1 += '<dd lay-value="' + data.data[i].u_name + '">' + data.data[i].u_name + '</dd>';
									html2 += '<option value="' + data.data[i].u_name + '">' + data.data[i].u_name + '</option>';
								}
								$("#cu_principal").next().children().eq(1).html(html1);
								$("#cu_principal").html(html2);

								$("#cu_principal").next().children().eq(1).html(html1);
								$("#cu_principal").html(html2);
								form.render(); //没有写这个，操作后没有效果

							}
						}
					});

/*

					//自定义表单验证
					//lay-verify ：对应userr、pass、等，required 为必填项
					form.verify({
						user: function(value) {
							if (value.length < 2) {
								return '用户名至少得2个字符啊';
							}
						},
						pass: [
							/^[\S]{6,12}$/, '密码必须6到12位，且不能出现空格'
						],
						content: function(value) {
							layedit.sync(editIndex);
						}
					});
*/

//6.删除所选客户
					$("#cu_del").click(function() {
						var checkStatus = table.checkStatus('testReload');
						var data = checkStatus.data;
						console.log("data=" + data)
						var ids = [];
						data.forEach(function(n, i) {
							ids.push(n.id);
						});
						console.log("ids="+ids)
						if (ids != '') {
							layer.confirm('确定删除所选项吗？', function(index) {
								console.log("ids===="+JSON.stringify(ids)+"=====")
								$.ajax({
									url: '../user/deleteUser',
									type: 'POST',
									contentType : "application/json" ,
									dataType: 'JSON',
									data:JSON.stringify(ids),
									success: function(data) {
										if (data.code === 0) {
											layer.msg('删除成功');
											table.reload('testReload', {});
										} else {
											layer.msg('删除失败');
										}
									},
									'error': function() {
										layer.msg('系统错误');
									}
								})
							})
						} else {
							/*layer.tips('请选择需要删除的行', $('.batchDel'), {
								tips: [3, '#5fb878']
							})*/
							layer.msg('请选择需要删除的行',{skin:'msgSkin'});

						}
					});

					//7.搜索按钮
					$('#search_btn').click(function() {
						var inputVal = $('#cu_input').val();
						console.log(inputVal);
						if (inputVal == '' || inputVal == null) {
							table.reload('testReload', {
								url: '../user/findAll',
								//methods:"post"
								/*where: {
									u_name: inputVal //设置需要传递的参数

								},*/
								page: {
									curr: 1 //条件查询从第一页开始，否则从当前页面开始
								}
							});
						} else {
                            $('#cu_input').val("");
							table.reload('testReload', {
								url: '../user/findByName',
								//methods:"post"
								where: {
									u_name: inputVal //设置需要传递的参数

								},
								page: {
									curr: 1 //条件查询从第一页开始，否则从当前页面开始
								}
							});
						}
					});

//键盘enter键
					$('.layui-input').keydown(function(e) { //当按下按键时
						if (e.which == 13) { //.which属性判断按下的是哪个键，回车键的键位序号为13
							// $('button.search123').trigger("click");//触发搜索按钮的点击事件
							$("#search_btn").click();
						}
					});

					//8.清空输入框
					//显示清空按钮
					$('#search_box').mouseover(function() {
						var inputVal = $(cu_input).val();
						$('#inputClear').removeClass('layui-hide');
					})

					//不显示清空按钮
					$('#search_box').mouseout(function() {
						var inputVal = $(cu_input).val();
						$('#inputClear').addClass('layui-hide');
					})

					$('#inputClear').click(function() {
						var inputVal = $('#cu_input').val();
						if (inputVal != '' || inputVal != null) {
							console.log("清空输入框")
							$('#cu_input').val('');
						}
					})

                })
            })
        </script>


        <script type="text/javascript">
			//模拟城市-联动/搜索
            $(function (){
				$('#city-picker-search').cityPicker({
					dataJson: cityData,
					storage:false,
					renderMode: true,
					search: true,
					linkage: true

				})
				// console.log(cityData)

            })

        </script>

	</body>
</html>
